package a.f.d;

import a.c.ab;
import a.c.e;
import a.c.x;
import a.f.d.a.ac;
import a.f.d.a.bc;
import a.f.d.a.hc;
import a.f.d.a.zb;
import a.f.o;
import a.f.zc;
import a.i.l;

import java.util.Comparator;

public class n
  implements fb, zb
{
  private double a = 1.0D;
  private double b = 0.0D;
  private double c = 1.7976931348623157E+308D;
  private double d = 0.0D;
  public static int e;
  
  public double a()
  {
    return this.a;
  }
  
  public void a(double paramDouble)
  {
    if (paramDouble < 0.0D) {
      throw new IllegalArgumentException();
    }
    this.a = paramDouble;
  }
  
  public double b()
  {
    return this.c;
  }
  
  public void b(double paramDouble)
  {
    if (paramDouble < 0.0D) {
      throw new IllegalArgumentException();
    }
    this.c = paramDouble;
  }
  
  public double c()
  {
    return this.b;
  }
  
  public void c(double paramDouble)
  {
    if (paramDouble < 0.0D) {
      throw new IllegalArgumentException();
    }
    this.b = paramDouble;
  }
  
  public void d(double paramDouble)
  {
    this.d = paramDouble;
  }
  
  public double d()
  {
    return this.d;
  }
  
  public int a(o paramo, x paramx, ab paramab)
  {
    int m = f.o;
    int k = f.n;
    if (m == 0) {
      if (paramo.n()) {
        return 0;
      }
    }
    e[] arrayOfe = paramo.t();
    o localo = paramo;
    l.a(arrayOfe, new Comparator()
    {
      private final o val$compGraph;
      
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        return l.a(n.this.a(this.val$compGraph, (e)paramAnonymousObject1), n.this.a(this.val$compGraph, (e)paramAnonymousObject2));
      }
    });
    int i = 0;
    double d1 = b(paramo, arrayOfe[0]);
    paramx.a(arrayOfe[0], i);
    int j = 1;
    do
    {
      do
      {
        if (j >= arrayOfe.length) {
          break;
        }
        e locale = arrayOfe[j];
        double d2 = a(paramo, locale);
        double d3 = b(paramo, locale);
        if (k != 0) {
          break label193;
        }
        if (d2 > d1)
        {
          i++;
          d1 = d3;
          if (m != 0) {
            continue;
          }
          if (k == 0) {}
        }
        else
        {
          if (m != 0) {
            continue;
          }
          if (d3 > d1) {
            d1 = d3;
          }
        }
        paramx.a(locale, i);
        j++;
      } while (k == 0);
      paramab.a(w.a(paramo, paramx));
    } while (m != 0);
    label193:
    return i + 1;
  }
  
  protected double a(o paramo, e parame)
  {
    zc localzc = paramo.d(parame);
    double d1 = Math.max(this.b, Math.min(this.c, this.d * 2.0D + localzc.d() * this.a));
    return localzc.b() + 0.5D * (localzc.d() - d1);
  }
  
  protected double b(o paramo, e parame)
  {
    zc localzc = paramo.d(parame);
    double d1 = Math.max(this.b, Math.min(this.c, this.d * 2.0D + localzc.d() * this.a));
    return localzc.b() + 0.5D * (localzc.d() + d1);
  }
  
  public void a(o paramo, ac paramac, bc parambc)
  {
    new hc(this).a(paramo, paramac, parambc);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.n

 * JD-Core Version:    0.7.0.1

 */